package com.asset.troubleticket.domain;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name="tt_employee")
public class Employee implements Serializable {
	
	private Integer id;   
    private String name;   
    private String email;  
    private String previldge;    
    private Integer level;   
    private boolean isActive;    
    private boolean firstLogin;    
    private Date registerDate;    
    private Date hireDate;   
    private String info;    
    private boolean flag;   
    private Company companyId;    
    private JobTitle jobTitleId;    
    private Department departmentId;    
    private Team teamId;    
    private Employee managerId;
    
    
    @Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE ,generator="tt_employee_id_seq")
	@SequenceGenerator(name="tt_employee_id_seq",sequenceName="tt_employee_id_seq",allocationSize=1)
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
	 this.id = id;
	}
	@Column(name="name")
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@Column(name="email")
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	@Column(name="previldge")
	public String getPrevildge() {
		return previldge;
	}
	public void setPrevildge(String previldge) {
		this.previldge = previldge;
	}
	@Column(name="level")
	public Integer getLevel() {
		return level;
	}
	public void setLevel(Integer level) {
		this.level = level;
	}
	@Column(name="is_active")
	public boolean isIsActive() {
		return isActive;
	}
	public void setIsActive(boolean isActive) {
		this.isActive = isActive;
	}
	@Column(name="first_login")
	public boolean isFirstLogin() {
		return firstLogin;
	}
	public void setFirstLogin(boolean firstLogin) {
		this.firstLogin = firstLogin;
	}
	@Column(name="register_date")
	public Date getRegisterDate() {
		return registerDate;
	}
	public void setRegisterDate(Date registerDate) {
		this.registerDate = registerDate;
	}
	@Column(name="hire_date")
	public Date getHireDate() {
		return hireDate;
	}
	public void setHireDate(Date hireDate) {
		this.hireDate = hireDate;
	}
	@Column(name="info")
	public String getInfo() {
		return info;
	}
	public void setInfo(String info) {
		this.info = info;
	}
	@Column(name="flag")
	public boolean isFlag() {
		return flag;
	}
	public void setFlag(boolean flag) {
		this.flag = flag;
	}
	@ManyToOne(fetch=FetchType.EAGER)
	@JoinColumn(name="company_id")
	public Company getCompanyId() {
		return companyId;
	}
	public void setCompanyId(Company companyId) {
		this.companyId = companyId;
	}
	@OneToOne
	@JoinColumn(name = "job_title_id")
	public JobTitle getJobTitleId() {
		return jobTitleId;
	}
	public void setJobTitleId(JobTitle jobTitleId) {
		this.jobTitleId = jobTitleId;
	}
	@ManyToOne
	@JoinColumn(name="department_id")
	public Department getDepartmentId() {
		return departmentId;
	}
	public void setDepartmentId(Department departmentId) {
		this.departmentId = departmentId;
	}
	@ManyToOne
	@JoinColumn(name="team_id")
	public Team getTeamId() {
		return teamId;
	}
	public void setTeamId(Team teamId) {
		this.teamId = teamId;
	}
	@ManyToOne
	@JoinColumn(name="manager_id")
	public Employee getManagerId() {
		return managerId;
	}
	public void setManagerId(Employee managerId) {
		this.managerId = managerId;
	}


}
